<script setup lang="ts">
import { PropType } from 'vue'
import type { TableData } from '@/api/table/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
import { formatToDateTime } from '@/utils/dateUtil'
defineProps({
  currentRow: {
    type: Object as PropType<Nullable<TableData>>,
    default: () => null
  },
  detailSchema: {
    type: Array as PropType<DescriptionsSchema[]>,
    default: () => []
  }
})
const decodeMsg = (msg) => {
  try {
    let str = decodeURI(msg)
    return str.replace(/&amp;/g, '&')
  } catch (e) {
    return msg
  }
}
</script>

<template>
  <h1 style="text-align: center">{{ currentRow?.company }}</h1>
  <p style="text-align: right">面试时间：{{ formatToDateTime(currentRow.times * 1) }}</p>
  <div v-html="decodeMsg(currentRow?.callbackmsg)"></div>
  <div>备注：{{ currentRow?.remark }}</div>
  <span style="font-size: 12px">面试人：{{ currentRow?.nickname }}</span>
  <!-- <Descriptions :schema="detailSchema" :data="currentRow || {}" /> -->
</template>
